package com.haibei.net;

import java.util.HashMap;

import android.graphics.Point;
import android.os.Build;

import com.common.uitl.Tool;
import com.haibei.App;

public class NetTool {

	public static HashMap<String, String> commMap = null;

	/**
	 * 获取公共参数,注意公共参数里面也有这个类型
	 * 
	 * @return
	 */
	public static HashMap<String, String> getCommonParam() {
		if (null == commMap) {
			commMap = new HashMap<String, String>();
			commMap = new HashMap<String, String>();
			commMap.put("deviceId", Tool.getImei(App.getApp()));
			commMap.put("imei", Tool.getImei(App.getApp()));
			commMap.put("clientVersion", Tool.getVersionName(App.getApp()));
			commMap.put("channel", Tool.getChannel(App.getApp()));
			commMap.put("clientType", "1");
			commMap.put("clientPhone", android.os.Build.MODEL);// 手机型号
			commMap.put("phoneVersion", Build.VERSION.RELEASE);// 操作系统版本
			Point p = Tool.getDisplayMetrics(App.getApp());
			commMap.put("screen", "(" + p.x + "," + p.y + ")");
		}
		return commMap;
	}
}
